<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/js/layui/css/layui.css" media="all">
</head>
<body>
<div style="width:80%;height:100%;margin:15px auto;overflow:auto;" id="aaa">
    <form class="layui-form" action="" id="update_staff">
        <input type="hidden" class="input-text" id="id" name="id">
        <input type="hidden" class="input-text" id="kk" name="kk">
        <div class="layui-form-item">
            <label class="layui-form-label">卡号</label>
            <div class="layui-input-inline" >
                <input type="text" id="cardNo" name="cardNo" readonly autocomplete="off" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 300px;line-height: 38px;">
                <span style="color: red;">请将工卡放入卡座，如未识别工卡，请重新放入</span>
            </div>
            <!--<div class="layui-form-mid layui-word-aux">辅助文字</div>-->
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">号牌号码</label>
            <div class="layui-input-block">
                <input type="text" name="cl_paizhao" required lay-verify="required" autocomplete="off" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">品牌型号</label>
            <div class="layui-input-block">
                <input type="text" name="cl_pinpai" required lay-verify="required" autocomplete="off" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">归属类别</label>
            <div class="layui-input-block">
                <input type="text" name="cl_guishu_status" required lay-verify="required" autocomplete="off" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">归属人姓名</label>
            <div class="layui-input-block">
                <input type="text" name="cl_guishuren_name" autocomplete="off" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">住址</label>
            <div class="layui-input-block">
                <input type="text" name="cl_zhuzhi" autocomplete="off" readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">核载人数</label>
            <div class="layui-input-block">
                <input type="text" name="cl_hezairen_num" autocomplete="off" readonly class="layui-input">
            </div>
            <!--<div class="layui-form-mid layui-word-aux">辅助文字</div>-->
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">总质量</label>
            <div class="layui-input-block">
                <input type="text" name="cl_zong_zhiliang" autocomplete="off" readonly class="layui-input">
            </div>
        </div>

        <div style="display: flex;flex-wrap: wrap">
            <div class="layui-form-item" style="width: 50%;margin-top: 15px">
                <label class="layui-form-label">车辆照片</label>
                <div class="layui-input-block">
                    <img class="layui-upload-img" name="cl_qianzhao" id="cl_qianzhao" style="width: 200px;height: 150px">
                    <p id="demoText1"></p>
                </div>
                <input type="hidden" class="input-text" id="logo1" name="logo1">
            </div>
<!--            <div class="layui-form-item" style="width: 50%;margin-top: 15px">-->
<!--                <label class="layui-form-label">后照</label>-->
<!--                <div class="layui-input-block">-->
<!--                    <img class="layui-upload-img" name="cl_houzhao" id="cl_houzhao" style="width: 200px;height: 150px">-->
<!--                    <p id="demoText2"></p>-->
<!--                </div>-->
<!--                <input type="hidden" class="input-text" id="logo2" name="logo2">-->
<!--            </div>-->
<!--            <div class="layui-form-item" style="width: 50%;margin-top: 15px">-->
<!--                <label class="layui-form-label">左照</label>-->
<!--                <div class="layui-input-block">-->
<!--                    <img class="layui-upload-img" name="cl_zuozhao" id="cl_zuozhao" style="width: 200px;height: 150px">-->
<!--                    <p id="demoText3"></p>-->
<!--                </div>-->
<!--                <input type="hidden" class="input-text" id="logo3" name="logo3">-->
<!--            </div>-->
<!--            <div class="layui-form-item" style="width: 50%;margin-top: 15px">-->
<!--                <label class="layui-form-label">右照</label>-->
<!--                <div class="layui-input-block">-->
<!--                    <img class="layui-upload-img" name="cl_youzhao" id="cl_youzhao" style="width: 200px;height: 150px">-->
<!--                    <p id="demoText4"></p>-->
<!--                </div>-->
<!--                <input type="hidden" class="input-text" id="logo4" name="logo4">-->
<!--            </div>-->
        </div>

        <div class="layui-form-item" style="margin-top: 20px">
            <div class="layui-input-block">
                <button class="layui-btn" id="resetCard" lay-submit lay-filter="resetCard">擦除卡信息</button>
            </div>
        </div>
    </form>
</div>
<script>
    //url 传参
    function GetQueryString(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var a = decodeURI(window.location.search);
        var r = a.substr(1).match(reg);//search,查询？后面的参数，并匹配正则
        if(r!=null)return  unescape(r[2]); return null;
    }
</script>
<script src="/js/layui/layui.all.js"></script>
<script src="/admin/js/token.js"></script>
<script src="./js/smartReader.js"></script>
<script src="./js/lock.js"></script>
<script src="./js/jquery.min.js"></script>
<script src="./js/card.js"></script>

<script>

    layui.use(['form' , 'jquery' , 'upload'], function(){
        var form = layui.form;
        var $ = layui.jquery;

        form.on('submit(resetCard)',function(data){
            var cardNo = $("#cardNo").val();
            layer.confirm("确认擦除卡信息？" , function(){
                var result = resetCard();
                if (result) {
                    layer.confirm("卡已擦除成功，可进入开卡页面进行开卡" , function(){
                        top.document.getElementById("mainframe").src="/admin/gongpai/cheliang_kk.html";
                    })
                }
            });

            return false;
        });


    });
</script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        var endDate= laydate.render({
            elem: '#end_time',//选择器结束时间
            type: 'datetime',
            min:"1970-1-1",//设置min默认最小值
            done: function(value,date){
                startDate.config.max={
                    year:date.year,
                    month:date.month-1,//关键
                    date: date.date,
                    hours: 0,
                    minutes: 0,
                    seconds : 0
                }
            }
        });

        //日期范围
        var startDate=laydate.render({
            elem: '#start_time',
            type: 'datetime',
            max:"2099-12-31",//设置一个默认最大值
            done: function(value, date){
                endDate.config.min ={
                    year:date.year,
                    month:date.month-1, //关键
                    date: date.date,
                    hours: 0,
                    minutes: 0,
                    seconds : 0
                };
            }
        });
    });
</script>
</body>
</html>